/*
 * https://github.com/morethanwords/tweb
 * Copyright (C) 2019-2021 Eduard Kuzmenko
 * https://github.com/morethanwords/tweb/blob/master/LICENSE
 */

.sidebar {
  &-header {
    background-color: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 1rem;
    min-height: 3.5rem;
    flex: 0 0 auto;
    user-select: none;
    cursor: default;

    .btn-menu {
      overflow-y: overlay;
    }

    @include respond-to(handhelds) {
      padding-inline: .5rem;
    }

    /* //position: sticky !important;
    position: sticky !important;
    top: 0;
    z-index: 1; */

    &__title {
      flex: 1;
      font-weight: var(--font-weight-bold);
      padding-inline-start: 1.5rem;
      font-size: 1.25rem;
      color: var(--primary-text-color);
    }

    .btn-icon + .btn-icon {
      margin-inline-start: .5rem;
    }

    &-right {
      flex: 0 0 auto;
    }

    .scrollable-y-bordered & {
      position: relative;
      // min-height: 3.5625rem;
      // border-bottom: 1px solid transparent;

      // @include animation-level(2) {
      //   transition: border-top-color var(--transition-standard-in), border-bottom-color var(--transition-standard-in);
      // }

      &:after {
        content: " ";
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 1px;
        opacity: 0;
        z-index: 1;
        background-color: var(--border-color);

        @include animation-level(2) {
          transition: opacity var(--transition-standard-in);
        }
      }
    }

    .scrollable-y-bordered:not(.scrolled-top) & {
      // border-bottom-color: var(--border-color);
      &:after {
        opacity: 1;
      }
    }
  }

  &-close-button {
    overflow: inherit !important;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
  }

  &-content {
    width: 100%;
    max-height: 100%;
    height: 100%;
    overflow: hidden;
    display: flex; /* idk why but need */
    position: relative;
    flex: 1 1 auto;

    /* @include respond-to(handhelds) {
      margin-top: 60px;
    } */

    /* > div {
      width: 100%;
    } */
  }
}
